# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-recommonmark
_pkgname=recommonmark
pkgver=0.6.0
pkgrel=1
pkgdesc='A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects.'
url='https://pypi.org/project/recommonmark/#files'
arch=('any')
license=('MIT')
depends=('python2' 'python2-commonmark' 'python2-docutils' 'python2-sphinx')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('f94f1ee426015478a95c2ed4b6ea87a75012447ae65d6623445f923d9d616b34efb055bcfde157862fcce38749c827905b839194fa1af3a1fe1cb7e11f18835a')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  for i in "$pkgdir/usr/bin/"*; do
    mv $i "${i}2"
  done
}

